<include file="News/header" />
<div class="page" id="page-index">
    <header class="bar bar-nav">
        <a class="button button-link button-nav pull-left open-popup" data-popup=".popup-search"> <span class="icon icon-search"></span>
        </a>
        <a class="button button-link button-nav pull-right open-popup" data-popup=".popup-about"> <span class="icon icon-menu"></span>
        </a>
        <eq name="thumb" value="1">
        <button class="button pull-right"><a href="{:U('News/index?thumb=false')}">无图</a></button>
        <else />
        <button class="button pull-right"><a href="{:U('News/index?thumb=true')}">有图</a></button>
        </eq>
        <h1 class="title">一起PHP</h1>
    </header>
    <div class="content infinite-scroll pull-to-refresh-content" data-distance="100">
        <div class="pull-to-refresh-layer">
            <div class="preloader"></div>
            <div class="pull-to-refresh-arrow"></div>
        </div>
        <input type="hidden" id="catid" value="{$catid}">
        <div class="list-block media-list">
            <ul class="list-container">
                <foreach name="page_list" item="item">
                <li class="item-content" data-id="{$item.id}">
                    <div class="item-inner">
                        <empty name="item.thumb">
                        <div class="item-title-row"><a href="{:U('News/show?id='.$item['id'])}">{$item.title}</a></div>
                        <div class="item-subtitle">
                            <span class="source">{$item.catname}</span><span class="time">{$item.create_time}</span>
                        </div>
                        <else />
                        <div class="has-image">
                            <div class="item-title-row"><a href="{:U('News/show?id='.$item['id'])}">{$item.title}</a></div>
                            <div class="item-subtitle">
                                <span class="source">{$item.catname}</span><span class="time">{$item.create_time}</span>
                            </div>
                        </div>
                        <a href="{:U('News/show?id='.$item['id'])}" class="image"><img src="{$item.thumb}"></a>
                        </empty>
                    </div>
                </li>
                </foreach>
            </ul>
        </div>
        <!-- 加载提示符 -->
        <div class="infinite-scroll-preloader">
            <div class="preloader"></div>
        </div>
    </div>
</div>
<div class="popup popup-search">
    <header class="bar bar-nav">
        <a class="button button-link button-nav pull-right close-popup"> 关闭 </a>
        <h1 class="title">一起PHP</h1>
    </header>
    <div class="content">
        <div class="content-inner">
            <div class="content-block">
                <form action="{:U('News/search')}">
                <input type="hidden" name="m" value="Home">
                <input type="hidden" name="c" value="News">
                <input type="hidden" name="a" value="search">
                    <div class="searchbar row">
                        <div class="search-input col-80">
                            <label class="icon icon-search" for="search"></label> 
                            <input type="search" id="search" name="keyword" placeholder="输入关键字...">
                        </div>
                        <button class="button button-fill button-primary col-20">搜索</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<include file="News/footer" />